<?php
/**
 * Created by PhpStorm.
 * User: mazhangyi
 * Date: 2020/1/9
 * Time: 16:14
 */

namespace app\api\model\v1;
use think\Db;
use think\Request;


class Email
{
  static function checkCode($code){
      $res = Db::name("jg_users_code")->where('CODE',$code)->select();
      $uid = $res[0]['UID'];
      Db::table('jg_users_code')->where('CODE',$code)->update(['STATUS'=>1]);
      return Db::name('jg_users')->where('UID',$uid)->update(['STATUS'=>1]);
   }
}